<template>
	<view class="query">
		
		<view class="list">
			<view class="listX">
				<view class="listX_left">
					<!-- <u-lazy-load class="lazy_load" :image="image + '-84_84'" :loading-img="loadingImg" ></u-lazy-load> -->
					<image :src="image + '-84_84'" mode="aspectFill"></image>
				</view>
				<view class="listX_right">
					<view class="title row2">{{title}}</view>
					<view class="money">
						<text v-if="course_type == 1">有效期：{{month}}个月</text>
						<text v-else></text>
						<text>￥{{price}}</text>
					</view>
				</view>
			</view>
			
		</view>
		<view class="footer">
			<view class="total">
				<text>需付款：</text>
				<text>￥{{price}}</text>
			</view>
			<view class="college" @tap="getPurchase">立即支付</view>
			<!-- <view class="error">错题库</view> -->
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				loadingImg: '',
				image: '',
				price: '',
				title: '',
				month: '',
				id: '',
				course_type: ''
			}
		},
		onLoad(option) {
			this.image = option.image
			this.price = option.price
			this.title = option.title
			this.month = option.month
			this.id = option.id
			this.course_type = option.course_type
		},
		onShow() {
			
		},
		methods: {
			getPurchase() {
				uni.navigateTo({
					url: '/pages/study/orderPayment?price=' + this.price + '&id=' + this.id
				})
			}
		}
	}
</script>

<style lang="scss" scoped>
	.query {
		.list {
			padding: 0 32rpx;
			.listX {
				padding:  32rpx 0;
				display: flex;
				border-bottom: 1rpx solid #EEEEEE;
				.listX_left {
					width: 168rpx;
					height: 168rpx;
					border-radius: 16rpx;
					// background: skyblue;
					margin-right: 24rpx;
					// /deep/.u-lazy-item {
					// 	width: 100%;
					// 	height: 100% !important;
					// }
					.lazy_load {
						height: 168rpx;
						border-radius: 8upx !important;
					}
					image {
						width: 100%;
						height: 100%;
						border-radius: 16rpx;
					}
				}
				.listX_right {
					width: calc(100% - 168rpx);
					.title {
						height: 90rpx;
						font-weight: bold;
						margin-bottom: 33rpx;
					}
					.money {
						color: #FF3A3A;
						font-weight: bold;
					}
					text:nth-child(1) {
						font-size: 24rpx;
						color: #333333;
						display: inline-block;
						transform: translateY(8rpx);
					}
					text:nth-child(2) {
						// text-align: right;
						display: inline-block;
						float: right;
					}
				}
			}
		}
		.footer {
			// display: flex;
			position: fixed;
			bottom: 0;
			width: 100%;
			height: 100rpx;
			background: #FFFFFF;
			box-shadow: 0px -1rpx 8rpx rgba(0, 0, 0, 0.1);
			opacity: 1;
			line-height: 100rpx;
			padding: 0 32rpx;
			padding-top: 14rpx;
			.total {
				padding-top: 0rpx !important;
				width: 300rpx;
				// height: 40rpx;
				transform: translateY(-10rpx);
				float: left;
				text:nth-child(1) {
					font-weight: 400;
				}
				text:nth-child(2) {
					color: #FF3A3A;
					font-weight: bold;
				}
			}
			.college {
				width: 210rpx;
				height: 72rpx;
				line-height: 72rpx;
				text-align: center;
				background: #267DFF;
				opacity: 1;
				border-radius: 36rpx;
				color: #FFFFFF;
				font-size: 28rpx;
				// margin: 0 40rpx 0 178rpx;
				float: right;
			}
		}
	}
</style>
